$nt-select-radius: $global-radius !default;
$nt-select-background: $white !default;

$nt-select-symbol-padding: $form-spacing / 2 !default;
$nt-select-symbol-color: $select-triangle-color !default;
$nt-select-symbol-font-family: '' !default;
$nt-select-symbol-caret: '\25BC' !default;
$nt-select-symbol-clear: '\00D7' !default;

@mixin nt-select {

  .nt-select {
    position: relative;
    display: block;

    &:focus {
      outline: none;
    }
  }

  $height: ($input-font-size * unitless-calc($input-line-height)) + (get-side($input-padding, 'top') + get-side($input-padding, 'bottom')) - rem-calc(1);

  .nt-select-clear,
  .nt-select-caret {
    position: absolute;
    right: $nt-select-symbol-padding;
    top: ($height - $input-font-size) / 2;
    font-size: 1em;
    line-height: 1em;
    &::after {
      font-family: $nt-select-symbol-font-family;
      display: block;
      color: $nt-select-symbol-color;
      left: auto;
    }
  }

  .nt-select-caret {
    pointer-events: none;
    &::after {
      display: inline-block;
      color: $nt-select-symbol-color;
      content: $nt-select-symbol-caret;
    }
  }

  .nt-select-clear {
    cursor: pointer;
    &::after {
      content: $nt-select-symbol-clear;
    }
  }

  .nt-select-pane {
    min-width: 100px;
    border-radius: $nt-select-radius;
    background-color: $nt-select-background;
    overflow-y: scroll;

    /* 目前存在 max-height 的初始值为0时 OverlayPosition 判断过早导致窗口边界超出浏览器的现象，在解决这个问题之前暂时注释此代码 */

    // max-height: 0px;
    // transition: max-height .3s;
    // &.folded {
      max-height: 256px;
    // }

    .filter-empty {
      padding: $nt-option-padding;
      color: $medium-gray;
      cursor: no-drop;
      // text-align: center;
    }
  }

  .nt-select-pane nt-ant-icon {
    margin-right: .3rem;
  }
}
